home *** CD-ROM | disk | FTP | other *** search
/ IBM InfoROM for OS/2 Beta 1995 January / IBM InfoROM for OS2 Beta 1-1995.ISO / testcert / mmedia / system / ap2 / scripts / m1_____d.p2s < prev    next >
Encoding:
Text File  |  1994-05-11  |  7.5 KB  |  224 lines

  1. open sequencer00 alias seq1_1 shareable wait
  2.  
  3. #################################################################
  4. #    set speakers connector for associated ampmixer, need to get
  5. #    handle on associated ampmixer first
  6. #################################################################
  7.  
  8. connection seq1_1 query type midi stream alias seq1_1amp1 wait
  9.  
  10. connector seq1_1amp1 enable type speakers wait
  11.  
  12. #################################################################
  13. #    load an element from *LOCAL* drive
  14. #################################################################
  15.  
  16. load seq1_1 ?AP2PATH?bach.mid wait
  17.  
  18. #################################################################
  19. #    cue sequencer for play
  20. #################################################################
  21.  
  22. cue seq1_1 output wait
  23.  
  24. #################################################################
  25. #    play sequencer for 5 seconds
  26. #################################################################
  27.  
  28. play seq1_1 notify
  29. +MM_MCINOTIFY MCI_NOTIFY_ABORTED MCI_PLAY
  30. @PAUSE 5000
  31.  
  32. #################################################################
  33. #    pause play of sequencer
  34. #################################################################
  35.  
  36. pause seq1_1 notify
  37. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_PAUSE #5
  38. @WAIT_NOTIFY 5 45000
  39.  
  40. #################################################################
  41. #    allow play to resume for 5 seconds
  42. #################################################################
  43.  
  44. resume seq1_1 notify
  45. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_RESUME
  46. @PAUSE 5000
  47.  
  48. #################################################################
  49. #    release exclusive control of resource
  50. #################################################################
  51.  
  52. release seq1_1 wait
  53.  
  54. #################################################################
  55. #    recover exclusive control of resource
  56. #################################################################
  57.  
  58. acquire seq1_1 exclusive notify
  59. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_ACQUIREDEVICE #7
  60. @WAIT_NOTIFY 7 45000
  61. @WAIT_PASSDEVICE seq1_1 45000
  62.  
  63. #################################################################
  64. #    immediately stop play of sequencer
  65. #################################################################
  66.  
  67. stop seq1_1 notify
  68. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_STOP #8
  69. @WAIT_NOTIFY 8 45000
  70.  
  71. #################################################################
  72. #    release exclusive control of resource
  73. #################################################################
  74.  
  75. release seq1_1 wait
  76.  
  77. #################################################################
  78. #    recover exclusive control of resource (cd device/acpa)
  79. #################################################################
  80.  
  81. acquire seq1_1 exclusive notify
  82. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_ACQUIREDEVICE #9
  83. @WAIT_NOTIFY 9 45000
  84. @WAIT_PASSDEVICE seq1_1 45000
  85.  
  86. #################################################################
  87. #    seek to start of media (currently loaded file)
  88. #################################################################
  89.  
  90. seek seq1_1 to 0 notify
  91. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_SEEK #10
  92. @WAIT_NOTIFY 10 45000
  93.  
  94. #################################################################
  95. #    release exclusive control of resource
  96. #################################################################
  97.  
  98. @PAUSE 2000
  99. release seq1_1 wait
  100.  
  101. #################################################################
  102. #    recover control of resource (cd device/acpa)
  103. #################################################################
  104.  
  105. acquire seq1_1 notify
  106. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_ACQUIREDEVICE #11
  107. @WAIT_NOTIFY 11 45000
  108. @WAIT_PASSDEVICE seq1_1 45000
  109.  
  110. #################################################################
  111. #    query status then disable speakers connector (disables internal
  112. #    speaker)
  113. #################################################################
  114.  
  115. connector seq1_1amp1 query type speakers wait
  116. =TRUE
  117.  
  118. connector seq1_1amp1 disable type speakers notify
  119. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_CONNECTOR #12
  120. @WAIT_NOTIFY 12 45000
  121.  
  122. #################################################################
  123. #    play for 3 seconds
  124. #################################################################
  125.  
  126. play seq1_1 notify
  127. +MM_MCINOTIFY MCI_NOTIFY_ABORTED MCI_PLAY
  128. @PAUSE 3000
  129.  
  130. #################################################################
  131. #    pause the play
  132. #################################################################
  133.  
  134. pause seq1_1 notify
  135. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_PAUSE #14
  136. @WAIT_NOTIFY 14 45000
  137.  
  138. #################################################################
  139. #    release exclusive control of resource
  140. #################################################################
  141.  
  142. release seq1_1 wait
  143.  
  144. #################################################################
  145. #    recover exclusive control of resource (cd device/acpa)
  146. #################################################################
  147.  
  148. acquire seq1_1 exclusive notify
  149. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_ACQUIREDEVICE #15
  150. @WAIT_NOTIFY 15 45000
  151.  
  152. #################################################################
  153. #    resume play for 3 seconds
  154. #################################################################
  155.  
  156. resume seq1_1 notify
  157. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_RESUME
  158. @PAUSE 3000
  159.  
  160. #################################################################
  161. #    release exclusive control of resource
  162. #################################################################
  163.  
  164. release seq1_1 wait
  165.  
  166. #################################################################
  167. #    recover exclusive control of resource (cd device/acpa)
  168. #################################################################
  169.  
  170. acquire seq1_1 exclusive notify
  171. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_ACQUIREDEVICE #16
  172. @WAIT_NOTIFY 16 45000
  173. @WAIT_PASSDEVICE seq1_1 45000
  174.  
  175. #################################################################
  176. #    stop play
  177. #################################################################
  178.  
  179. stop seq1_1 notify
  180. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_STOP #17
  181. @WAIT_NOTIFY 17 45000
  182.  
  183. #################################################################
  184. #    release exclusive control of resource (cd device/acpa)
  185. #################################################################
  186.  
  187. release seq1_1 wait
  188.  
  189. #################################################################
  190. #    instance is inactive.  Do some statuses
  191. #    Since this is one process now, instance is NOT inactive...
  192. #################################################################
  193.  
  194. status seq1_1 time format wait
  195. =mmtime
  196.  
  197. status seq1_1 ready wait
  198. =TRUE
  199.  
  200. #################################################################
  201. #    recover control of resource (cd device/acpa)
  202. #################################################################
  203.  
  204. acquire seq1_1 notify
  205. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_ACQUIREDEVICE #18
  206. @WAIT_NOTIFY 18 45000
  207. @WAIT_PASSDEVICE seq1_1 45000
  208.  
  209. #################################################################
  210. #    seek to end of media (currently loaded element)
  211. #################################################################
  212.  
  213. seek seq1_1 to end notify
  214. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_SEEK #19
  215. @WAIT_NOTIFY 19 45000
  216.  
  217. #################################################################
  218. #    close sequencer instance
  219. #################################################################
  220.  
  221. close seq1_1 notify
  222. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_CLOSE #20
  223. @WAIT_NOTIFY 20 45000
  224.